#!/bin/bash

# git安装脚本
# wget -O git-install.sh https://raw.gitcode.com/u010800804/run-sh/raw/main/git-install.sh && sh git-install.sh

echo 'git-install-> start'
sudo yum install git
echo 'git-install-> end'
sleep 2

echo 'git-install-> version:'
git --version

hostname=`cat /etc/hostname`
ssh-keygen -t rsa -C $hostname

git config --global user.name $hostname
git config --global user.email $hostname

echo 'git-install-> id_rsa.pub:'
cat /root/.ssh/id_rsa.pub

sleep 2
echo 'git-install-> finish'